﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UcSensorMornitoringEnglish.ascx.cs" Inherits="TheHeGeo.UserControl.UcSensorMornitoringEnglish" %>
<%@ Register assembly="DevExpress.Web.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web" tagprefix="dx" %>




<style type="text/css">
    .auto-style1 {
    }
    .auto-style2 {
        width: 77px;
    }
    .auto-style3 {
        width: 68px;
    }
    .auto-style4 {
        width: 723px;
    }
</style>
<div style="width: 98%">
    <asp:Button ID="btReloadGrvData" runat="server" Text="Reload" OnClick="btReloadGrvData_Click" Width="101px" />
    <br/>
    <dx:ASPxGridView ID="grvData" runat="server" AutoGenerateColumns="False" Width="100%" OnCustomButtonCallback="grvData_CustomButtonCallback" OnCustomButtonInitialize="grvData_CustomButtonInitialize">
        <Columns>
            <dx:GridViewDataTextColumn VisibleIndex="0" Caption="Project" FieldName="DuAn" Name="DuAn" GroupIndex="0" SortIndex="0" SortOrder="Ascending">
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                <CellStyle HorizontalAlign="Left" VerticalAlign="Top">
                </CellStyle>
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn VisibleIndex="1" Caption="Equipment" FieldName="ThietBi" Name="ThietBi" Width="60px">
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                <CellStyle HorizontalAlign="Left" VerticalAlign="Top">
                </CellStyle>
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn VisibleIndex="6" Caption="Sensor" FieldName="Sensor" Name="Sensor" Width="60px">
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                <CellStyle HorizontalAlign="Left" VerticalAlign="Top">
                </CellStyle>
            </dx:GridViewDataTextColumn>
            <dx:GridViewCommandColumn Name="cmdBtn" ShowInCustomizationForm="False" VisibleIndex="11" ButtonType="Image" Caption="Control" Width="80px">
                <CustomButtons>
                    <dx:GridViewCommandColumnCustomButton ID="grvBtnStart" Text="Turn On sensor" Visibility="AllDataRows" Image-Width="20" Image-Url="../Master/images/startBtn.png"
                        Image-Height="20">
<Image Height="20px" Width="20px" Url="../Master/images/startBtn.png"></Image>
                    </dx:GridViewCommandColumnCustomButton>
                    <dx:GridViewCommandColumnCustomButton ID="grvBtnPause" Text="Pause sensor" Visibility="AllDataRows" Image-Width="20" Image-Url="../Master/images/pauseBtn.png"
                        Image-Height="20">
<Image Height="20px" Width="20px" Url="../Master/images/pauseBtn.png"></Image>
                    </dx:GridViewCommandColumnCustomButton>
                    <dx:GridViewCommandColumnCustomButton ID="grvBtnStop" Text="TurnOff sensor" Visibility="AllDataRows" Image-Width="20" Image-Url="../Master/images/stopBtn.png"
                        Image-Height="20">
<Image Height="20px" Width="20px" Url="../Master/images/stopBtn.png"></Image>
                    </dx:GridViewCommandColumnCustomButton>
                    <dx:GridViewCommandColumnCustomButton ID="grvBtnDetail" Text="Detail" Visibility="AllDataRows" Image-Width="20" Image-Url="~/images/demo.png"
                        Image-Height="20">
<Image Height="20px" Width="20px" Url="~/images/demo.png"></Image>
                    </dx:GridViewCommandColumnCustomButton>
                </CustomButtons>
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
            </dx:GridViewCommandColumn>
            <dx:GridViewDataDateColumn Caption="Test date" FieldName="EndTestDate" Name="EndTestDate" VisibleIndex="10" Width="20px">
                <PropertiesDateEdit DisplayFormatString="yyyy/MM/dd HH:mm:ss.ff">
                </PropertiesDateEdit>
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                <CellStyle HorizontalAlign="Left" VerticalAlign="Top">
                </CellStyle>
            </dx:GridViewDataDateColumn>
            <dx:GridViewDataDateColumn Caption="Start test date" FieldName="StartTestDate" Name="StartTestDate" VisibleIndex="9" Width="20px">
                <PropertiesDateEdit DisplayFormatString="yyyy/MM/dd HH:mm:ss.ff">
                </PropertiesDateEdit>
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                <CellStyle HorizontalAlign="Left" VerticalAlign="Top">
                </CellStyle>
            </dx:GridViewDataDateColumn>
            <dx:GridViewDataTextColumn Caption="Status" FieldName="Status" Name="Status" VisibleIndex="7" Width="70px">
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                <CellStyle HorizontalAlign="Left" VerticalAlign="Top">
                </CellStyle>
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Sensor ID" FieldName="MaSensor" Name="MaSensor" Visible="False" VisibleIndex="3">
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                <CellStyle HorizontalAlign="Left" VerticalAlign="Top">
                </CellStyle>
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="MaDuAn" FieldName="MaDuAn" Name="MaDuAn" Visible="False" VisibleIndex="5">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Unit" FieldName="DonVi" Name="DonVi" VisibleIndex="2" Width="60px">
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                <CellStyle HorizontalAlign="Left" VerticalAlign="Top">
                </CellStyle>
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn FieldName="TrangThaiTest" Name="TrangThaiTest" Visible="False" VisibleIndex="4">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Note" FieldName="GhiChuTest" Name="GhiChuTest" VisibleIndex="8" Width="100px">
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                <CellStyle HorizontalAlign="Left" VerticalAlign="Top" Wrap="True">
                </CellStyle>
            </dx:GridViewDataTextColumn>
        </Columns>
        <SettingsBehavior AutoFilterRowInputDelay="100" />
        <SettingsPager PageSize="20">
        </SettingsPager>
        <Settings ShowFilterRow="True" ShowFilterRowMenu="True" />
    </dx:ASPxGridView>
    
</div>

<div style="width: 98%">
    <br />
    
    <dx:ASPxGridView ID="grvDetailData" runat="server" AutoGenerateColumns="False" Width="100%" OnCustomButtonCallback="grvData_CustomButtonCallback" ClientInstanceName="UcEqMornitoring">
        <Columns>
            <dx:GridViewDataTextColumn VisibleIndex="0" Caption="Value" FieldName="GiaTri" Name="GiaTri">
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                <CellStyle HorizontalAlign="Left" VerticalAlign="Top">
                </CellStyle>
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataDateColumn Caption="Measuring date" FieldName="ThoiGianDo" Name="ThoiGianDo" VisibleIndex="1">
                <PropertiesDateEdit DisplayFormatString="yyyy/MM/dd HH:mm:ss.ff" EditFormat="Custom" EditFormatString="yyyy/MM/dd HH:mm:ss.ff">
                </PropertiesDateEdit>
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                <CellStyle HorizontalAlign="Left" VerticalAlign="Top">
                </CellStyle>
            </dx:GridViewDataDateColumn>
        </Columns>
        <SettingsBehavior AutoFilterRowInputDelay="100" />
        <SettingsPager PageSize="20">
        </SettingsPager>
        <Settings ShowFilterRow="True" ShowFilterRowMenu="True" ShowTitlePanel="True" />
        <SettingsText Title="Detail data" />
    </dx:ASPxGridView>
    
</div>
<dx:ASPxGridViewExporter ID="gridExport" runat="server" GridViewID="grvDetailData">
</dx:ASPxGridViewExporter>
<dx:ASPxPopupControl ID="popMsg" runat="server" HeaderText="Warning" Height="128px" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" ShowCloseButton="False" Width="442px">
    <ContentCollection>
<dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
    <table style="width:100%;">
        <tr>
            <td class="auto-style1">&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td class="auto-style1">&nbsp;</td>
            <td class="auto-style1">
                <dx:ASPxLabel ID="lblMsg" runat="server" Text=" You Have not permission control sensor">
                </dx:ASPxLabel>
            </td>
        </tr>
        <tr>
            <td class="auto-style1">&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td class="auto-style1">&nbsp;</td>
            <td>
                <asp:Button ID="btPopOk" runat="server" OnClick="btPopOk_Click" Text="Ok" />
            </td>
        </tr>
    </table>
        </dx:PopupControlContentControl>
</ContentCollection>
</dx:ASPxPopupControl>

<dx:ASPxPopupControl ID="popNewTest" runat="server" HeaderText="Input information" Height="128px" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" ShowCloseButton="False" Width="442px">
    <ContentCollection>
<dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
    <table style="width:100%;">
        <tr>
            <td class="auto-style2">
                <dx:ASPxLabel ID="lblMsg1" runat="server" Text="Name/Note">
                </dx:ASPxLabel>
            </td>
            <td rowspan="5" colspan="2">
                <dx:ASPxMemo ID="txtGhiChu" runat="server" Height="71px" Width="100%">
                </dx:ASPxMemo>
            </td>
        </tr>
        <tr>
            <td class="auto-style2">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="auto-style2">&nbsp;</td>
        </tr>
        <tr>
            <td class="auto-style2">&nbsp;</td>
        </tr>
        <tr>
            <td class="auto-style2">&nbsp;</td>
        </tr>
        <tr>
            <td class="auto-style2">
                &nbsp;</td>
            <td class="auto-style3">
                <asp:Button ID="btPopTestOk" runat="server" OnClick="btPopTestOk_Click" Text="OK" />
            </td>
            <td>
                <asp:Button ID="btPopTestCancel" runat="server" OnClick="btPopTestCancel_Click" Text="Cancel" />
            </td>
        </tr>
    </table>
        </dx:PopupControlContentControl>
</ContentCollection>
</dx:ASPxPopupControl>

